package com.yss.reportworld.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yss.common.core.annotation.EasyExcel;
import com.yss.common.core.utils.easyexecl.IntegerConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.yss.common.core.web.domain.BaseEntity;

import java.util.List;

/**
 * 基础数据配置信息对象 report_world_database_dispose
 *
 * @author yss
 * @date 2023-03-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("report_world_database_dispose")
public class DatabaseDispose extends BaseEntity {

    /**
     * 主键
     */
    @ExcelIgnore
    @TableId("ID")
    private String id;

    /**
     * 表名
     */
    @ExcelProperty(value = "表名")
    @TableField("TABLE_NAME")
    private String tableName;

    /**
     * 页面显示类型
     * 显示类型（input文本框、textarea文本域、select下拉框、checkbox复选框、
     * radio单选框、datetime日期控件、image图片上传控件、upload文件上传控件、editor富文本控件）
     */
    @ExcelProperty(value = "页面显示类型")
    @TableField("COMPONENT_TYPE")
    private String componentType;

    /**
     * 显示顺序
     */
    @ExcelProperty(value = "显示顺序")
    @TableField("ORDER_NUM")
    private Integer orderNum;

    /**
     * 是否必填
     */
    @ExcelProperty(value = "是否必填")
    @TableField("REQUIRED")
    private Integer required;

    /**
     * 是否显示
     */
    @ExcelProperty(value = "是否显示")
    @TableField("IS_SHOW")
    private Integer isShow;
    /**
     * 是否查询条件
     */
    @ExcelProperty(value = "是否查询条件")
    @TableField("IS_QUERY")
    private Integer isQuery;


    /**
     * 字段名称
     */
    @ExcelProperty(value = "字段名称")
    @TableField("PROP")
    private String prop;

    /**
     * 字段说明
     */
    @ExcelProperty(value = "字段说明")
    @TableField("LABEL")
    private String label;


    /**
     * 是否主键
     */
    @ExcelProperty(value = "页面显示类型")
    @TableField("IS_PRIMARY")
    private Integer isPrimary;

    /**
     * 是否业务主键
     */
    @ExcelProperty(value = "页面显示类型")
    @TableField("IS_BUSINESS_PRIMARY")
    private Integer isBusinessPrimary;

    /**
     * 字典编码
     */
    @ExcelProperty(value = "字典编码")
    @TableField("CODE_NAME")
    private String codeName;

    @ExcelProperty(value = "宽度")
    @TableField("WIDTH")
    private Integer width;
    /**
     * 状态
     */
    @ExcelProperty(value = "状态", converter = IntegerConverter.class)
    @EasyExcel(readConverterExp = "1=正常,2=停用")
    @TableField("STATUS")
    private Integer status;

    @ExcelProperty(value = "是否业务主键重复比较字段")
    @TableField("IS_COMPARE")
    private Integer isCompare;

    @ExcelProperty(value = "正则表达式")
    @TableField("REGULAR")
    private String regular;

    @ExcelProperty(value = "正则表达式")
    @TableField("REGULAR_MSG")
    private String regularMsg;

    @ExcelProperty(value = "查询方式")
    @TableField("SELECT_TYPE")
    private String selectType;

    /**
     * 版本号
     */
    @ExcelProperty(value = "版本号")
    @TableField("VERSION")
    private String version;

    @ExcelIgnore
    @TableField(exist = false)
    private List<TpGlExhibDatadict> options;

    @ExcelIgnore
    @TableField(exist = false)
    private List<String> idList;
    /**
     * 历史版本号
     */
    @ExcelIgnore
    @TableField(exist = false)
    private String hisVersion;

    // 导出的时候选择 数据的主键
    @ExcelIgnore
    @TableField(exist = false)
    private String ids;
}
